package com.spc.car.data.service.log.impl;

import com.spc.car.data.entity.log.LogProjectOperation;
import com.spc.car.data.mapper.log.LogProjectOperationMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spc.car.data.service.log.LogProjectOperationService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.validation.constraints.NotNull;
import java.util.Objects;

/**
 * <p>
 * 项目日志表 服务实现类
 * </p>
 *
 * @author 
 * @since 2020-04-20
 */
@Service
public class LogProjectOperationServiceImpl extends ServiceImpl<LogProjectOperationMapper, LogProjectOperation> implements LogProjectOperationService {

    @Async
    @Override
    public void saveAsync(@NotNull LogProjectOperation logProjectOperation) {
        if (Objects.nonNull(logProjectOperation)
                && StringUtils.isNotBlank(logProjectOperation.getRemark())) {
            save(logProjectOperation);
        }
    }
}
